#pragma once

namespace boost
{
    template< typename T >
    class weak_ptr_caller: public shared_ptr< T >
    {
    public:
        weak_ptr_caller( const weak_ptr< T > & wptr ): shared_ptr< T >( wptr ) {}

        operator T * ()
        {
            return get();
        }
    };

    template< typename T >
    weak_ptr_caller< T > get_pointer( const weak_ptr< T > & wptr )
    {
        return weak_ptr_caller< T >( wptr );
    }
}
